package com.nova.edc.dao.system.impl;

import com.nova.edc.dao.system.DeviceLightDao;
import com.nova.edc.model.system.DeviceLight;
import com.nova.frame.dao.buzz.JdbcBaseDAO;
import com.nova.frame.dao.criterion.Restrictions;

public class DeviceLightDaoImpl extends JdbcBaseDAO<DeviceLight, Integer>
		implements DeviceLightDao {

	@Override
	public DeviceLight getLightByCode(String lightCode, Integer lightType) {
		return query()
				.add(Restrictions.eq("t_device_light.LightCode", lightCode))
				.add(Restrictions.eq("t_device_light.LightType", lightType))
				.get();
	}

}
